<template>
  <div>
    <h1>首页</h1>
    {{ list }}
  </div>
</template>
<script>
// 设置公共路径--vuex模块里的路径
import { createNamespacedHelpers } from "vuex";
const { mapState, mapMutations } = createNamespacedHelpers("A/");
export default {
  computed: {
    ...mapState(["list"]),
  },
  methods: {
    ...mapMutations(["setList"]),
  },
  mounted() {
    this.setList({ id: 55, text: "我是内容" });
  },
};
</script>
<style lang="scss" scoped>
</style>